//
//  SelectBellContentView.m
//  WangLottery
//
//  Created by 黄修勇 on 12-5-1.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import "SelectBellContentView.h"

@interface SelectBellContentView ()

@property (nonatomic)NSInteger lastSelectNumber;

-(void)setDefault;

@end

@implementation SelectBellContentView

@synthesize bellMargin=_bellMargin;
@synthesize bellWidthAndHeight=_bellWidthAndHeight;
@synthesize delegate=_delegate;
@synthesize isSigleSelect=_isSigleSelect;
@synthesize selectNumberArray=_selectNumberArray; 
@synthesize lastSelectNumber=_lastSelectNumber;

-(void)dealloc{

    _delegate=nil;
    [selectNums release];
    [super dealloc];
}

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
    }
    return self;
}



-(void)setDefault{

    _bellWidthAndHeight=50.0f;
    _bellMargin=15.0f;
    _isSigleSelect=NO;
    _selectNumberArray=[NSMutableArray new];
    _lastSelectNumber=-1;
    
    for (int i=0; i<10; i++) {
        BellButton *btn=[BellButton creatBellWithFrame:CGRectZero];
        btn.bellColor=BellColorRed;
        btn.bellState=BellStateNormal;
        btn.number=i;
        [self addSubview:btn];
    }
    
}

-(NSArray *)selectNumberArray{

    return [NSArray arrayWithArray:selectNums];
}

-(void)bellBtnDone:(BellButton *)btn{
    
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

@end
